package cn.kgc.mapper;

import cn.kgc.pojo.Room;
import cn.kgc.pojo.RoomType;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
import java.util.List;

/**
<<<<<<< HEAD
 * @author 李梦煊
 * @version 1.0
 * @date 2022/10/7 - 14:01
 */
@Repository
public interface RoomMapper {
    //模糊查询
    List<Room> getRoomByName(@Param("currentPage") Integer currentPage,
                             @Param("limit") Integer limit,
                             @Param("typeName") String typeName);
    //总页数
    int getTotalCount(@Param("typeName") String typeName);

    //报表
    int getDisByName(@Param("typeName")String typeName);


    //新增房间
    int addRoom(Room room);

    //删除房间
    int deleRoomById(@Param("roomId") String roomId);

    //修改房间
    int updateRoom( Room room);

    //根据id查询房间
    RoomType findRoomById(@Param("typeId") Integer typeId);

    //查房间号
    List<Room> addOrders(@Param("typeName") String typeName);

    Room findRoomByNum(@Param("roomNum") int roomNum);

}
